package com.frame.controller;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.frame.domain.SysFactory;
import com.frame.service.SysFactoryService;


public class CellDataDemoHeadDataListenerFactory implements ReadListener<SysFactory> {


    private SysFactoryService sysFactoryService;

    public CellDataDemoHeadDataListenerFactory(SysFactoryService sysFactoryService) {
        this.sysFactoryService = sysFactoryService;
    }

    @Override
    public void invoke(SysFactory date, AnalysisContext analysisContext) {
        sysFactoryService.insertFactory(date);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

        System.out.println("--------解析完之后的方法----------");
    }
}
